import request from '@/helpers/request';

//获取维修记录
export const reqReapirList = () => {
  return request('api/maintenanceRecord/getAllRecords');
};

//添加维修记录
export const reqAddRepair = (params) => {
  return request('api/maintenanceRecord/addRecord', {
    method: 'POST',
    params,
  });
};

//删除维修记录
export const reqDelRepair = (params) => {
  return request('api​/maintenanceRecord​/deleteRecord', {
    method: 'POST',
    params,
  });
};

//编辑维修记录
export const reqUpdateInfo = (params) => {
  return request('api​/maintenanceRecord​/updateInfo', {
    method: 'POST',
    params,
  });
};

//根据id获取单辆车的详情
export const reqRepairDetail = (params) => {
  return request('api/maintenanceRecord/getInfoByMaintenanceId', {
    method: 'GET',
    params,
  });
};
